<h1>Listing users</h1>
<% model_class = User %>
<table class="table table-striped">
  <thead>
    <tr>
        <th><%= model_class.human_attribute_name :username %> </th>
        <th><%= model_class.human_attribute_name :email %> </th>
        <th><%= model_class.human_attribute_name :password %> </th>
        <th><%= model_class.human_attribute_name :radchecks %> </th>
        <th><%= model_class.human_attribute_name :radreply %> </th>
        <th><%= model_class.human_attribute_name :actions  %> </th>
    </tr>
  </thead>

  <tbody>
    <% @users.each do |user| %>
      <tr>
        <td><%= link_to user.username, user%></td>
        <td><%= user.email %></td>
        <td><%= user.password%></td>
        <td><%= link_to "radchecks", user_radchecks_path(user) %></td>
        <td><%= link_to "radreplies", user_radreplies_path(user) %></td>
        <!--
        -->
        <td><%= link_to btn_icon(:edit), edit_user_path(user) %>
        <%= link_to btn_icon(:trash), user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New User', new_user_path, class: "btn btn-primary btn-mini" %>
